<template>
  <div class="home-like">
    <div class="like-top">
      <!-- <i class="like-icon"></i>  -->
      <i class="iconfont">&#xe705;</i>
      <span>猜你喜欢</span>
    </div>
    <div class="like-list">
      <div class="like-item" v-for="item in likeList" :key="item.id">
        <div class="item-img">
          <img :src="item.imgUrl" :alt="item.title">
          <span class="item-perch">可定日期</span>
        </div>
        <div class="item-info">
          <h3>{{ item.title }}</h3>
          <div class="item-stars">
            <span class="star">{{ item.star }}</span>
            <span class="item-mes">{{ item.mes }}条评论</span>
          </div>
          <div class="item-area">
            <p class="item-mark">
              <span>¥{{ item.mark }}</span>起
            </p>
            <p class="area">{{ item.area }}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HomeLike",
  props: {
    likeList: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    return {

    }
  }
}
</script>

<style scoped>
  .home-like {
    font-size: .28rem;
    background: #fff;
    margin-bottom: .2rem;
  }
  .like-top {
    font-size: .32rem;
    line-height: .44rem;
    margin-bottom: .1rem;
  }
  .like-top i {
    font-size: .32rem;
    color: red;
    margin: 0 .02rem 0 .2rem;
  }
  .like-top span {
    color: #212121;
    font-size: .32rem;
  }
  .like-item {
    display: flex;
    padding: .1rem 0;
    border-bottom: 1px solid #eee;
  }
  .item-img {
    flex: 4;
    position: relative;
    margin: 0 .2rem;
  }
  .item-img img {
    width: 100%;
  }
  .item-img .item-perch {
    position: absolute;
    left: 0;
    top: 0;
    padding: .08rem;
    font-size: .24rem;
    background-image: linear-gradient(-90deg,#58d9f8,#c3eaf8);
    border-bottom-right-radius: .2rem;
  }
  .item-info {
    flex: 6;
    color: #333;
  }
  .item-info h3 {
    font-size: .32rem;
    color: #333;
    font-weight: bold;
    line-height: .6rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }
  .item-info .item-stars {
    line-height: .6rem;
  }
  .item-info .item-stars .star {
    margin-right: .2rem;
  }
  .item-info .item-area {
    line-height: .6rem;
  }
  .item-area p {
    display: inline-block;
  }
  .item-area .item-mark span {
    color: #ff8300;
    font-size: .32rem;
  }
  .item-area .area {
    float: right;
    margin-right: .3rem;
  }
</style>
